<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>Administradores</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="css/freelancer.css" rel="stylesheet" type="text/css">
    <link rel="shortcut icon" href="img/icon.png">

    <!-- Fonts -->
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="css/matheus.css">

    <!-- IE8 support for HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->

 	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="<c:url value="js/jquery.puts.js"/>"></script> 
	<script type="text/javascript" src="<c:url value="js/jquery.min.js"/>"></script>
	<script type="text/javascript" src="<c:url value="js/bootstrap.js"/>"></script>
	<script type="text/javascript" src="<c:url value="js/jquery-1.3.2.min.js"/>"></script>
</head>

<body id="page-top" class="index">

    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header page-scroll">
                <img src="img/logo100.png">
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
    <br><br><br><br><br><br>
        <h3 align="center">Administradores</h3>
    <table class="table" align="center" border="1" border->
    <tr bgcolor="#fff">
        <td><b>Nome</b></td>
        <td><b>E-mail</b></td>
        <td><b>Data de Nascimento</b></td>
        <td><b>Editar</b></td>
        <td><b>Excluir</b></td>

    </tr>
        <c:forEach var="administrador" items="${administradores}">
        <tr>
            <td>${administrador.nome}</td>
            <td>${administrador.email}</td>                                                                                                                                                                                                                                                                                                                     
            <td>${administrador.dataNascimentoAdministrador} </td>
            <td><a href="/SAE/mvc?logica=LogicaSetAdministrador&id=${administrador.id}"><img src="img/edit.png" width="20px" height="20px"></a></td>
            <td><a data-toggle="modal" href="#excluirModal${administrador.id}"><img src="img/delete.png" width="20px" height="20px"></td>
        </tr>
    </c:forEach>
   </table>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <footer class="text-center">
        <div class="footer-below">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        Copyright &copy; 2014 - Grupec Inc.
                    </div>
                </div>
            </div>
        </div>
    </footer>
<c:forEach var="administrador" items="${administradores}">
	<div class="modal fade" id="excluirModal${administrador.id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 
		<div class="modal-dialog"> 
			<div class="modal-content"> 
				<div class="modal-header"> 
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
					<h4 class="modal-title">Excluir administrador</h4>
				</div>
				<div class="modal-body">
					<h5>Deseja realmente excluir o administrador: ${administrador.nome}?</h5> 
				</div>  
				<div class="modal-footer">
					<a href="/SAE/mvc?logica=LogicaAdministradorCrud&Metodo=excluirAdministrador&id=${administrador.id}" class="btn btn-primary">Excluir</a>
					<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button> 
				</div>
			</div> 
		</div>
	</div>
</c:forEach>
</body>

</html>
